﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvTrans.aspx.cs" Inherits="WMS6.Web.Inventory.InvTrans" meta:resourcekey="Page" %>

<%@ Register src="../UserControls/LotAtrributeCtrl.ascx" tagname="LotAtrributeCtrl" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>InvTrans</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />
    <script src="../Js/jquery.js" type="text/javascript"></script>
    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script> 
    <script src="../Js/util.js" type="text/javascript"></script>
    <script src="../Js/InitPage.js" type="text/javascript"></script>
    <script src="../Js/Verification.js" type="text/javascript"></script>
    <script src="../Js/calendar.js" type="text/javascript" charset="gb2312"></script>
   
    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initEditNewPage();
            setLotValue();
        }
        
        function newASN()
        {
            var from = document.getElementById("hdnFrom").value;
            window.location.href = "ASN.aspx?from=" + escape(from);
            return false;
        }
        
        //弹出窗口选择PO
        function popPurchaseOrderQuery()
        {
            var rtnValue = popModalWindow('../OrderManagement/PurchaseOrderQuery.aspx?action=txtPoID','dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;')
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById("txtPoID").focus();
                document.getElementById("txtPoID").value = rtnValue;
            }
            document.getElementById("hdnInport").value = "Y";
        }
        
        //弹出窗口选择货主
        function selectOwner()
        {
            var rtnValue = popModalWindow('../Configuration/OwnerQuery.aspx?action=txtOwnerID','dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById("txtOwnerID").focus();
                document.getElementById("txtOwnerID").value = rtnValue;
            }
        }
        
        //设置批次属性值
        function setLotValue()
        {
            for(var i =1;i<11;i++)
            {                
                if(document.getElementById("LotAtrributeCtrl1_ctrl"+i) != null)
                {
                    if(document.getElementById("hdnType").value == "")  //非编辑状态，从ReceiptDetail中批次属性值
                    {
                        if(document.getElementById("LotAtrributeCtrl1_ctrl"+i).value == "")
                        {
                            document.getElementById("LotAtrributeCtrl1_ctrl"+i).value = document.getElementById("hdnLot"+i).value;
                        }
                    }
                    else  //编辑状态 取批次属性的默认值
                    {
                        document.getElementById("LotAtrributeCtrl1_ctrl"+i).value = document.getElementById("hdnLot"+i).value;
                    }
                }
            }
            if(document.getElementById("LotAtrributeCtrl1_txtProduct") != null)
            {
                if(document.getElementById("hdnType").value == "") //非编辑状态，从ReceiptDetail中批次属性值
                {
                    if(document.getElementById("LotAtrributeCtrl1_txtProduct").value == "")
                    {
                        document.getElementById("LotAtrributeCtrl1_txtProduct").value = document.getElementById("hdnProductDate").value;
                    }
                }
                else  //编辑状态 取批次属性的默认值
                {
                    document.getElementById("LotAtrributeCtrl1_txtProduct").value = document.getElementById("hdnProductDate").value;
                }
            }
            if(document.getElementById("LotAtrributeCtrl1_txtExpiryDate") != null)
            {
                if(document.getElementById("hdnType").value == "") //非编辑状态，从ReceiptDetail中批次属性值
                {
                    if(document.getElementById("LotAtrributeCtrl1_txtExpiryDate").value == "")
                    {
                        document.getElementById("LotAtrributeCtrl1_txtExpiryDate").value = document.getElementById("hdnExpiryDate").value;
                    }
                }
                else  //编辑状态 取批次属性的默认值
                {
                    document.getElementById("LotAtrributeCtrl1_txtExpiryDate").value = document.getElementById("hdnExpiryDate").value;
                }
            }
            
            //隐藏日期控件
             if(document.getElementById("LotAtrributeCtrl1_imgProductDate") != null)
            {
                document.getElementById("LotAtrributeCtrl1_imgProductDate").style.display = "none";
            }
            if(document.getElementById("LotAtrributeCtrl1_imgExpiryDate") != null)
            {
                document.getElementById("LotAtrributeCtrl1_imgExpiryDate").style.display = "none";
            }
        }
        
    </script>
</head>
<body>
    <form id="F5021" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom"><asp:Label ID="lblOwner" runat="server" CssClass="label_header" 
                            Text="交易明细" meta:resourcekey="lblOwner"></asp:Label></td>
                    <td><asp:Button ID="btnGoBack" runat="server" Enabled="False" CssClass="button" 
                            Text="<%$Resources:ButtonResource,btnGoBack%>"   OnClick="btnGoBack_Click" ValidationGroup="aaa" /></td>
                </tr>
            </table>
        </div>
       
                <div>
                    <asp:Label ID="lblMsg" runat="server" CssClass="label_message" 
                        meta:resourcekey="lblMsg"></asp:Label>
                </div>
                
               <div id="div_menu">
                    <div style="float: left; width: 8px;">
                        <div class="tabL" id="divL1"></div>
                    </div>
                    <div style="float:left;" class="tabLabelCont tabCur" onclick="setTab('one',1,2)" id="divM1">
                        <asp:Label ID="one1" CssClass="hover" runat="server" 
                            meta:resourcekey="one1">基本信息</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR" id="divR1"></div>
                    </div>
                    
                    <div style="float: left; width: 8px;">
                        <div class="tabL_1" id="divL2"></div>
                    </div>
                    <div style="float:left;" class="tabLabelCont tabCur_1" onclick="setTab('one',2,2);" id="divM2">
                        <asp:Label ID="one2" CssClass="navigationlabel" runat="server" 
                            meta:resourcekey="one2">批次属性</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR_1" id="divR2"></div>
                    </div>                 
               </div>
            
         <div id="div_content">
                 <div id="con_one_1" style="display:block;">
                    <table width="720px" style="display: block; margin-left: 10px; margin-top: 10px;">
                        <tr>
                            <td width="180px">
                                <asp:Label ID="lblReceiptID" CssClass="label" runat="server" Text="货主代码" 
                                    meta:resourcekey="lblReceiptID"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblSkuID" CssClass="label" runat="server" Text="货品代码" 
                                    meta:resourcekey="lblSkuID"></asp:Label>
                            </td>
                            
                            <td width="180px" colspan="2">
                                <asp:Label ID="lblDesc" runat="server" CssClass="label" Text="货品描述" 
                                    meta:resourcekey="lblDesc"></asp:Label>
                            </td>                        
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:TextBox ID="txtOwnerID" runat="server" CssClass="textbox" Enabled="False" 
                                    meta:resourcekey="txtOwnerID" ></asp:TextBox>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtSkuID" runat="server" CssClass="textbox" Enabled="False" 
                                    meta:resourcekey="txtSkuID"  ></asp:TextBox>
                            </td>
                            <td width="360px" colspan=2>
                                <asp:TextBox ID="txtDesc" runat="server" CssClass="largetextbox" 
                                    Enabled="False" meta:resourcekey="txtDesc"></asp:TextBox>
                            </td>
                          
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:Label ID="lblTransID" runat="server" CssClass="label" Text="交易号" 
                                    meta:resourcekey="lblTransID"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblCreatedDate" runat="server" CssClass="label" Text="交易日期" 
                                    meta:resourcekey="lblCreatedDate"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblTransType" runat="server" CssClass="label" Text="交易类型" 
                                    meta:resourcekey="lblTransType"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblHoldCode" runat="server" CssClass="label" Text="冻结原因" 
                                    meta:resourcekey="lblHoldCode" ></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:TextBox ID="txtTransID" runat="server" CssClass="textbox" Enabled="False" 
                                    meta:resourcekey="txtTransID"></asp:TextBox>
                            </td>
                            <td width="180px">
                                  <asp:TextBox ID="txtCreatedDate" runat="server" CssClass="textbox" 
                                      Enabled="False" meta:resourcekey="txtCreatedDate"></asp:TextBox>
                            </td>
                            <td width="180px">
                            <asp:TextBox ID="txtTransType" runat="server" CssClass="textbox" Enabled="False" 
                                    meta:resourcekey="txtTransType"></asp:TextBox>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtHoldCode" runat="server" CssClass="textbox" Enabled="False" 
                                    meta:resourcekey="txtHoldCode"  ></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:Label ID="lblPackID" runat="server" CssClass="label" Text="包装包装" 
                                    meta:resourcekey="lblPackID"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblFromLpnID" runat="server" CssClass="label" Text="来源LPN" 
                                    meta:resourcekey="lblFromLpnID"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblToLpnID" runat="server" CssClass="label" Text="目标LPN" 
                                    meta:resourcekey="lblToLpnID"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblUpdateBy" runat="server" CssClass="label" Text="编辑人" 
                                    meta:resourcekey="lblUpdateBy"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:TextBox ID="txtPackID" runat="server" CssClass="textbox" Enabled="False" 
                                    meta:resourcekey="txtPackID"  ></asp:TextBox>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtFromLpnID" runat="server" CssClass="textbox" 
                                    Enabled="False" meta:resourcekey="txtFromLpnID"  ></asp:TextBox>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtToLpnID" runat="server" CssClass="textbox" Enabled="False" 
                                    meta:resourcekey="txtToLpnID"></asp:TextBox>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtUpdateBy" runat="server" CssClass="textbox" Enabled="False" 
                                    meta:resourcekey="txtUpdateBy"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:Label ID="lblUomID" runat="server" CssClass="label" Text="计量单位" 
                                    meta:resourcekey="lblUomID"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblFromLoc" runat="server" CssClass="label" Text="来源货位" 
                                    meta:resourcekey="lblFromLoc"></asp:Label>
                            </td>                           
                            <td width="180px">
                                <asp:Label ID="lblToLoc" runat="server" CssClass="label" Text="目标货位" 
                                    meta:resourcekey="lblToLoc"></asp:Label>
                            </td>
                             <td width="180px">
                                <asp:Label ID="lblUpdateDate" runat="server" CssClass="label" Text="编辑日期" 
                                     meta:resourcekey="lblUpdateDate"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:TextBox ID="txtUomID" runat="server" CssClass="textbox" Enabled="False" 
                                    meta:resourcekey="txtUomID"  ></asp:TextBox>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtFromLoc" runat="server" CssClass="textbox" Enabled="False" 
                                    meta:resourcekey="txtFromLoc"  ></asp:TextBox>
                            </td>
                            <td width="180px">
                                 <asp:TextBox ID="txtToLoc" runat="server" CssClass="textbox" Enabled="False" 
                                     meta:resourcekey="txtToLoc"  ></asp:TextBox>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtUpdateDate" runat="server" CssClass="textbox" 
                                    Enabled="False" meta:resourcekey="txtUpdateDate"></asp:TextBox>
                            </td>
                        </tr>
                           <tr>
                            <td width="180px">
                                <asp:Label ID="lblQty" runat="server" CssClass="label" Text="数量" 
                                    meta:resourcekey="lblQty"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblDocID" runat="server" CssClass="label" Text="来源单号" 
                                    meta:resourcekey="lblDocID"></asp:Label>
                            </td>       
                             <td width="180px">
                              <asp:Label ID="lblDocLineID" runat="server" CssClass="label" Text="来源单行号" 
                                     meta:resourcekey="lblDocLineID"></asp:Label>
                            </td>                    
                            <td width="180px">
                                <asp:Label ID="lblSourceTransType" runat="server" CssClass="label" Text="来源类型" 
                                    meta:resourcekey="lblSourceTransType"></asp:Label>
                            </td>
                            
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:TextBox ID="txtQty" runat="server" CssClass="textbox" Enabled="False" 
                                    meta:resourcekey="txtQty"  ></asp:TextBox>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtDocID" runat="server" CssClass="textbox" Enabled="False" 
                                    meta:resourcekey="txtDocID"  ></asp:TextBox>
                            </td>
                             <td width="180px">
                                  <asp:TextBox ID="txtDocLineID" runat="server" CssClass="textbox" 
                                      Enabled="False" meta:resourcekey="txtDocLineID"  ></asp:TextBox>
                            </td>
                            <td width="180px">
                                 <asp:TextBox ID="txtSourceTransType" runat="server" CssClass="textbox" 
                                     Enabled="False" meta:resourcekey="txtSourceTransType"  ></asp:TextBox>
                            </td>
                           
                        </tr>
                        <tr style="height:10px;"><td></td><td></td><td></td><td></td></tr>
                    </table>
                 </div>
                 <div id="con_one_2" style="display:none;" >
                    <table width="720px" style="display: block; margin-left: 10px; margin-top: 10px;" >
                        <tr>
                           
                            <td width="180px">
                                <asp:Label ID="lblExternalLot" runat="server" CssClass="label" Text="外部批号" 
                                    meta:resourcekey="lblExternalLot"></asp:Label>
                            </td>
                            <td width="180px" >
                                &nbsp;</td>
                              <td width="180px" colspan=2 >
                                  &nbsp;</td>
                        </tr>
                        <tr>
                           
                            <td width="180px" >
                                <asp:TextBox ID="txtExternalLot" runat="server" CssClass="textbox" 
                                    Enabled="False" meta:resourcekey="txtExternalLot"></asp:TextBox>
                            </td>
                            <td width="180px" >
                                &nbsp;</td>
                            <td width="180px" >
                                &nbsp;</td>
                        </tr>
                    </table>
                    <table style="display:block; margin-left:10px; ">
                            <tr>
                                <td><uc1:LotAtrributeCtrl ID="LotAtrributeCtrl1" runat="server" Enabled="false" CtrlType="IN"  /></td>
                            </tr>
                            <tr style="height: 10px;">
                                <td>
                                </td>
                            </tr>
                        </table>
                 </div>                       
           </div>           
 
         
    </div>
    <input type="hidden" id="hdnType" runat="server" />
    <asp:HiddenField ID="hdnLot1" runat="server" />
    <asp:HiddenField ID="hdnLot2" runat="server" />
    <asp:HiddenField ID="hdnLot3" runat="server" />
    <asp:HiddenField ID="hdnLot4" runat="server" />
    <asp:HiddenField ID="hdnLot5" runat="server" />
    <asp:HiddenField ID="hdnLot6" runat="server" />
    <asp:HiddenField ID="hdnLot7" runat="server" />
    <asp:HiddenField ID="hdnLot8" runat="server" />
    <asp:HiddenField ID="hdnLot9" runat="server" />
    <asp:HiddenField ID="hdnLot10" runat="server" />
    <asp:HiddenField ID="hdnProductDate" runat="server" />
    <asp:HiddenField ID="hdnExpiryDate" runat="server" />
    </form>
</body>
</html>
